/**
 */
package org.mro.grib.model.files.secondEdition.grids.impl;

import java.nio.ByteBuffer;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.mro.grib.model.files.secondEdition.grids.GridDefinitionTemplate3100;
import org.mro.grib.model.files.secondEdition.grids.GridsPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Grid Definition Template3100</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getExponentOf2 <em>Exponent Of2</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getExponentOf3 <em>Exponent Of3</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getNumberOfIntervals <em>Number Of Intervals</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getNumberOfDiamonds <em>Number Of Diamonds</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getLatitudeOfThePolePoint <em>Latitude Of The Pole Point</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getLongitudeOfThePolePoint <em>Longitude Of The Pole Point</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getLongitudeOfTheCentreLineOfTheFirstDiamond <em>Longitude Of The Centre Line Of The First Diamond</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getGridPointPosition <em>Grid Point Position</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getNumberingOrderOfDiamonds <em>Numbering Order Of Diamonds</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getScanningModeForOneDiamond <em>Scanning Mode For One Diamond</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3100Impl#getTotalNumberOfGridPoints <em>Total Number Of Grid Points</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class GridDefinitionTemplate3100Impl extends EObjectImpl implements GridDefinitionTemplate3100 {
	/**
	 * The default value of the '{@link #getExponentOf2() <em>Exponent Of2</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExponentOf2()
	 * @generated
	 * @ordered
	 */
	protected static final byte EXPONENT_OF2_EDEFAULT = 0x00;

	/**
	 * The cached value of the '{@link #getExponentOf2() <em>Exponent Of2</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExponentOf2()
	 * @generated
	 * @ordered
	 */
	protected byte exponentOf2 = EXPONENT_OF2_EDEFAULT;

	/**
	 * The default value of the '{@link #getExponentOf3() <em>Exponent Of3</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExponentOf3()
	 * @generated
	 * @ordered
	 */
	protected static final byte EXPONENT_OF3_EDEFAULT = 0x00;

	/**
	 * The cached value of the '{@link #getExponentOf3() <em>Exponent Of3</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExponentOf3()
	 * @generated
	 * @ordered
	 */
	protected byte exponentOf3 = EXPONENT_OF3_EDEFAULT;

	/**
	 * The default value of the '{@link #getNumberOfIntervals() <em>Number Of Intervals</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfIntervals()
	 * @generated
	 * @ordered
	 */
	protected static final short NUMBER_OF_INTERVALS_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getNumberOfIntervals() <em>Number Of Intervals</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfIntervals()
	 * @generated
	 * @ordered
	 */
	protected short numberOfIntervals = NUMBER_OF_INTERVALS_EDEFAULT;

	/**
	 * The default value of the '{@link #getNumberOfDiamonds() <em>Number Of Diamonds</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfDiamonds()
	 * @generated
	 * @ordered
	 */
	protected static final byte NUMBER_OF_DIAMONDS_EDEFAULT = 0x00;

	/**
	 * The cached value of the '{@link #getNumberOfDiamonds() <em>Number Of Diamonds</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfDiamonds()
	 * @generated
	 * @ordered
	 */
	protected byte numberOfDiamonds = NUMBER_OF_DIAMONDS_EDEFAULT;

	/**
	 * The default value of the '{@link #getLatitudeOfThePolePoint() <em>Latitude Of The Pole Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatitudeOfThePolePoint()
	 * @generated
	 * @ordered
	 */
	protected static final int LATITUDE_OF_THE_POLE_POINT_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLatitudeOfThePolePoint() <em>Latitude Of The Pole Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatitudeOfThePolePoint()
	 * @generated
	 * @ordered
	 */
	protected int latitudeOfThePolePoint = LATITUDE_OF_THE_POLE_POINT_EDEFAULT;

	/**
	 * The default value of the '{@link #getLongitudeOfThePolePoint() <em>Longitude Of The Pole Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfThePolePoint()
	 * @generated
	 * @ordered
	 */
	protected static final int LONGITUDE_OF_THE_POLE_POINT_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLongitudeOfThePolePoint() <em>Longitude Of The Pole Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfThePolePoint()
	 * @generated
	 * @ordered
	 */
	protected int longitudeOfThePolePoint = LONGITUDE_OF_THE_POLE_POINT_EDEFAULT;

	/**
	 * The default value of the '{@link #getLongitudeOfTheCentreLineOfTheFirstDiamond() <em>Longitude Of The Centre Line Of The First Diamond</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfTheCentreLineOfTheFirstDiamond()
	 * @generated
	 * @ordered
	 */
	protected static final int LONGITUDE_OF_THE_CENTRE_LINE_OF_THE_FIRST_DIAMOND_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLongitudeOfTheCentreLineOfTheFirstDiamond() <em>Longitude Of The Centre Line Of The First Diamond</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfTheCentreLineOfTheFirstDiamond()
	 * @generated
	 * @ordered
	 */
	protected int longitudeOfTheCentreLineOfTheFirstDiamond = LONGITUDE_OF_THE_CENTRE_LINE_OF_THE_FIRST_DIAMOND_EDEFAULT;

	/**
	 * The default value of the '{@link #getGridPointPosition() <em>Grid Point Position</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getGridPointPosition()
	 * @generated
	 * @ordered
	 */
	protected static final byte GRID_POINT_POSITION_EDEFAULT = 0x00;

	/**
	 * The cached value of the '{@link #getGridPointPosition() <em>Grid Point Position</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getGridPointPosition()
	 * @generated
	 * @ordered
	 */
	protected byte gridPointPosition = GRID_POINT_POSITION_EDEFAULT;

	/**
	 * The default value of the '{@link #getNumberingOrderOfDiamonds() <em>Numbering Order Of Diamonds</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberingOrderOfDiamonds()
	 * @generated
	 * @ordered
	 */
	protected static final byte NUMBERING_ORDER_OF_DIAMONDS_EDEFAULT = 0x00;

	/**
	 * The cached value of the '{@link #getNumberingOrderOfDiamonds() <em>Numbering Order Of Diamonds</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberingOrderOfDiamonds()
	 * @generated
	 * @ordered
	 */
	protected byte numberingOrderOfDiamonds = NUMBERING_ORDER_OF_DIAMONDS_EDEFAULT;

	/**
	 * The default value of the '{@link #getScanningModeForOneDiamond() <em>Scanning Mode For One Diamond</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getScanningModeForOneDiamond()
	 * @generated
	 * @ordered
	 */
	protected static final byte SCANNING_MODE_FOR_ONE_DIAMOND_EDEFAULT = 0x00;

	/**
	 * The cached value of the '{@link #getScanningModeForOneDiamond() <em>Scanning Mode For One Diamond</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getScanningModeForOneDiamond()
	 * @generated
	 * @ordered
	 */
	protected byte scanningModeForOneDiamond = SCANNING_MODE_FOR_ONE_DIAMOND_EDEFAULT;

	/**
	 * The default value of the '{@link #getTotalNumberOfGridPoints() <em>Total Number Of Grid Points</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTotalNumberOfGridPoints()
	 * @generated
	 * @ordered
	 */
	protected static final int TOTAL_NUMBER_OF_GRID_POINTS_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getTotalNumberOfGridPoints() <em>Total Number Of Grid Points</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTotalNumberOfGridPoints()
	 * @generated
	 * @ordered
	 */
	protected int totalNumberOfGridPoints = TOTAL_NUMBER_OF_GRID_POINTS_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected GridDefinitionTemplate3100Impl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return GridsPackage.Literals.GRID_DEFINITION_TEMPLATE3100;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte getExponentOf2() {
		return exponentOf2;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setExponentOf2(byte newExponentOf2) {
		byte oldExponentOf2 = exponentOf2;
		exponentOf2 = newExponentOf2;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__EXPONENT_OF2, oldExponentOf2, exponentOf2));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte getExponentOf3() {
		return exponentOf3;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setExponentOf3(byte newExponentOf3) {
		byte oldExponentOf3 = exponentOf3;
		exponentOf3 = newExponentOf3;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__EXPONENT_OF3, oldExponentOf3, exponentOf3));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public short getNumberOfIntervals() {
		return numberOfIntervals;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setNumberOfIntervals(short newNumberOfIntervals) {
		short oldNumberOfIntervals = numberOfIntervals;
		numberOfIntervals = newNumberOfIntervals;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBER_OF_INTERVALS, oldNumberOfIntervals, numberOfIntervals));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte getNumberOfDiamonds() {
		return numberOfDiamonds;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setNumberOfDiamonds(byte newNumberOfDiamonds) {
		byte oldNumberOfDiamonds = numberOfDiamonds;
		numberOfDiamonds = newNumberOfDiamonds;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBER_OF_DIAMONDS, oldNumberOfDiamonds, numberOfDiamonds));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLatitudeOfThePolePoint() {
		return latitudeOfThePolePoint;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLatitudeOfThePolePoint(int newLatitudeOfThePolePoint) {
		int oldLatitudeOfThePolePoint = latitudeOfThePolePoint;
		latitudeOfThePolePoint = newLatitudeOfThePolePoint;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__LATITUDE_OF_THE_POLE_POINT, oldLatitudeOfThePolePoint, latitudeOfThePolePoint));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLongitudeOfThePolePoint() {
		return longitudeOfThePolePoint;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLongitudeOfThePolePoint(int newLongitudeOfThePolePoint) {
		int oldLongitudeOfThePolePoint = longitudeOfThePolePoint;
		longitudeOfThePolePoint = newLongitudeOfThePolePoint;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__LONGITUDE_OF_THE_POLE_POINT, oldLongitudeOfThePolePoint, longitudeOfThePolePoint));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLongitudeOfTheCentreLineOfTheFirstDiamond() {
		return longitudeOfTheCentreLineOfTheFirstDiamond;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLongitudeOfTheCentreLineOfTheFirstDiamond(int newLongitudeOfTheCentreLineOfTheFirstDiamond) {
		int oldLongitudeOfTheCentreLineOfTheFirstDiamond = longitudeOfTheCentreLineOfTheFirstDiamond;
		longitudeOfTheCentreLineOfTheFirstDiamond = newLongitudeOfTheCentreLineOfTheFirstDiamond;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__LONGITUDE_OF_THE_CENTRE_LINE_OF_THE_FIRST_DIAMOND, oldLongitudeOfTheCentreLineOfTheFirstDiamond, longitudeOfTheCentreLineOfTheFirstDiamond));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte getGridPointPosition() {
		return gridPointPosition;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setGridPointPosition(byte newGridPointPosition) {
		byte oldGridPointPosition = gridPointPosition;
		gridPointPosition = newGridPointPosition;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__GRID_POINT_POSITION, oldGridPointPosition, gridPointPosition));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte getNumberingOrderOfDiamonds() {
		return numberingOrderOfDiamonds;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setNumberingOrderOfDiamonds(byte newNumberingOrderOfDiamonds) {
		byte oldNumberingOrderOfDiamonds = numberingOrderOfDiamonds;
		numberingOrderOfDiamonds = newNumberingOrderOfDiamonds;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBERING_ORDER_OF_DIAMONDS, oldNumberingOrderOfDiamonds, numberingOrderOfDiamonds));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte getScanningModeForOneDiamond() {
		return scanningModeForOneDiamond;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setScanningModeForOneDiamond(byte newScanningModeForOneDiamond) {
		byte oldScanningModeForOneDiamond = scanningModeForOneDiamond;
		scanningModeForOneDiamond = newScanningModeForOneDiamond;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__SCANNING_MODE_FOR_ONE_DIAMOND, oldScanningModeForOneDiamond, scanningModeForOneDiamond));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getTotalNumberOfGridPoints() {
		return totalNumberOfGridPoints;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTotalNumberOfGridPoints(int newTotalNumberOfGridPoints) {
		int oldTotalNumberOfGridPoints = totalNumberOfGridPoints;
		totalNumberOfGridPoints = newTotalNumberOfGridPoints;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3100__TOTAL_NUMBER_OF_GRID_POINTS, oldTotalNumberOfGridPoints, totalNumberOfGridPoints));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__EXPONENT_OF2:
				return getExponentOf2();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__EXPONENT_OF3:
				return getExponentOf3();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBER_OF_INTERVALS:
				return getNumberOfIntervals();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBER_OF_DIAMONDS:
				return getNumberOfDiamonds();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LATITUDE_OF_THE_POLE_POINT:
				return getLatitudeOfThePolePoint();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LONGITUDE_OF_THE_POLE_POINT:
				return getLongitudeOfThePolePoint();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LONGITUDE_OF_THE_CENTRE_LINE_OF_THE_FIRST_DIAMOND:
				return getLongitudeOfTheCentreLineOfTheFirstDiamond();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__GRID_POINT_POSITION:
				return getGridPointPosition();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBERING_ORDER_OF_DIAMONDS:
				return getNumberingOrderOfDiamonds();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__SCANNING_MODE_FOR_ONE_DIAMOND:
				return getScanningModeForOneDiamond();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__TOTAL_NUMBER_OF_GRID_POINTS:
				return getTotalNumberOfGridPoints();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__EXPONENT_OF2:
				setExponentOf2((Byte)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__EXPONENT_OF3:
				setExponentOf3((Byte)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBER_OF_INTERVALS:
				setNumberOfIntervals((Short)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBER_OF_DIAMONDS:
				setNumberOfDiamonds((Byte)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LATITUDE_OF_THE_POLE_POINT:
				setLatitudeOfThePolePoint((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LONGITUDE_OF_THE_POLE_POINT:
				setLongitudeOfThePolePoint((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LONGITUDE_OF_THE_CENTRE_LINE_OF_THE_FIRST_DIAMOND:
				setLongitudeOfTheCentreLineOfTheFirstDiamond((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__GRID_POINT_POSITION:
				setGridPointPosition((Byte)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBERING_ORDER_OF_DIAMONDS:
				setNumberingOrderOfDiamonds((Byte)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__SCANNING_MODE_FOR_ONE_DIAMOND:
				setScanningModeForOneDiamond((Byte)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__TOTAL_NUMBER_OF_GRID_POINTS:
				setTotalNumberOfGridPoints((Integer)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__EXPONENT_OF2:
				setExponentOf2(EXPONENT_OF2_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__EXPONENT_OF3:
				setExponentOf3(EXPONENT_OF3_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBER_OF_INTERVALS:
				setNumberOfIntervals(NUMBER_OF_INTERVALS_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBER_OF_DIAMONDS:
				setNumberOfDiamonds(NUMBER_OF_DIAMONDS_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LATITUDE_OF_THE_POLE_POINT:
				setLatitudeOfThePolePoint(LATITUDE_OF_THE_POLE_POINT_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LONGITUDE_OF_THE_POLE_POINT:
				setLongitudeOfThePolePoint(LONGITUDE_OF_THE_POLE_POINT_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LONGITUDE_OF_THE_CENTRE_LINE_OF_THE_FIRST_DIAMOND:
				setLongitudeOfTheCentreLineOfTheFirstDiamond(LONGITUDE_OF_THE_CENTRE_LINE_OF_THE_FIRST_DIAMOND_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__GRID_POINT_POSITION:
				setGridPointPosition(GRID_POINT_POSITION_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBERING_ORDER_OF_DIAMONDS:
				setNumberingOrderOfDiamonds(NUMBERING_ORDER_OF_DIAMONDS_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__SCANNING_MODE_FOR_ONE_DIAMOND:
				setScanningModeForOneDiamond(SCANNING_MODE_FOR_ONE_DIAMOND_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__TOTAL_NUMBER_OF_GRID_POINTS:
				setTotalNumberOfGridPoints(TOTAL_NUMBER_OF_GRID_POINTS_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__EXPONENT_OF2:
				return exponentOf2 != EXPONENT_OF2_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__EXPONENT_OF3:
				return exponentOf3 != EXPONENT_OF3_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBER_OF_INTERVALS:
				return numberOfIntervals != NUMBER_OF_INTERVALS_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBER_OF_DIAMONDS:
				return numberOfDiamonds != NUMBER_OF_DIAMONDS_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LATITUDE_OF_THE_POLE_POINT:
				return latitudeOfThePolePoint != LATITUDE_OF_THE_POLE_POINT_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LONGITUDE_OF_THE_POLE_POINT:
				return longitudeOfThePolePoint != LONGITUDE_OF_THE_POLE_POINT_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__LONGITUDE_OF_THE_CENTRE_LINE_OF_THE_FIRST_DIAMOND:
				return longitudeOfTheCentreLineOfTheFirstDiamond != LONGITUDE_OF_THE_CENTRE_LINE_OF_THE_FIRST_DIAMOND_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__GRID_POINT_POSITION:
				return gridPointPosition != GRID_POINT_POSITION_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__NUMBERING_ORDER_OF_DIAMONDS:
				return numberingOrderOfDiamonds != NUMBERING_ORDER_OF_DIAMONDS_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__SCANNING_MODE_FOR_ONE_DIAMOND:
				return scanningModeForOneDiamond != SCANNING_MODE_FOR_ONE_DIAMOND_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3100__TOTAL_NUMBER_OF_GRID_POINTS:
				return totalNumberOfGridPoints != TOTAL_NUMBER_OF_GRID_POINTS_EDEFAULT;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (exponentOf2: "); //$NON-NLS-1$
		result.append(exponentOf2);
		result.append(", exponentOf3: "); //$NON-NLS-1$
		result.append(exponentOf3);
		result.append(", numberOfIntervals: "); //$NON-NLS-1$
		result.append(numberOfIntervals);
		result.append(", numberOfDiamonds: "); //$NON-NLS-1$
		result.append(numberOfDiamonds);
		result.append(", latitudeOfThePolePoint: "); //$NON-NLS-1$
		result.append(latitudeOfThePolePoint);
		result.append(", longitudeOfThePolePoint: "); //$NON-NLS-1$
		result.append(longitudeOfThePolePoint);
		result.append(", longitudeOfTheCentreLineOfTheFirstDiamond: "); //$NON-NLS-1$
		result.append(longitudeOfTheCentreLineOfTheFirstDiamond);
		result.append(", gridPointPosition: "); //$NON-NLS-1$
		result.append(gridPointPosition);
		result.append(", numberingOrderOfDiamonds: "); //$NON-NLS-1$
		result.append(numberingOrderOfDiamonds);
		result.append(", scanningModeForOneDiamond: "); //$NON-NLS-1$
		result.append(scanningModeForOneDiamond);
		result.append(", totalNumberOfGridPoints: "); //$NON-NLS-1$
		result.append(totalNumberOfGridPoints);
		result.append(')');
		return result.toString();
	}

	/* (non-Javadoc)
	 * @see org.mro.grib.model.files.secondEdition.grids.IGridDefinition#initialise(java.nio.ByteBuffer)
	 */
	@Override
	public void initialise(ByteBuffer buffer) {
		exponentOf2 = buffer.get();
		exponentOf3 = buffer.get();
		numberOfIntervals = buffer.getShort();
		numberOfDiamonds = buffer.get();
		latitudeOfThePolePoint = buffer.getInt();
		longitudeOfThePolePoint = buffer.getInt();
		longitudeOfTheCentreLineOfTheFirstDiamond = buffer.getInt();
		gridPointPosition = buffer.get();
		numberingOrderOfDiamonds = buffer.get();
		scanningModeForOneDiamond = buffer.get();
		totalNumberOfGridPoints = buffer.getInt();
	}

} //GridDefinitionTemplate3100Impl
